import { ref } from 'vue'
import { generateFromString } from 'generate-avatar'

const avators = ref<string[]>([])
export const getBatchAvator = (batch: number) => {

    for (let i = 0; i < batch; i++) {
        const avatarSvg = generateFromString("example@test.com" + i.toString())
        const avator = `data:image/svg+xml;utf8,${avatarSvg}`
        avators.value.push(avator)
    }
    return avators
}


export const getAvator = (seed: string) => {

    const avatarSvg = generateFromString(seed)
    const avator = `data:image/svg+xml;utf8,${avatarSvg}`
    return avator
}